#include <iostream>
using namespace std;

typedef void (*CALLBACK)(int a,int b);

class base
{
private:
	int m;
	int n;
	static CALLBACK func;
public:
	void registercallback(CALLBACK fun,int k,int j);
	void callcallback();

};

CALLBACK base::func=NULL;

void base::registercallback(CALLBACK fun,int k,int j)
{
	func=fun;
	m=k;
	n=j;
}

void base::callcallback()
{
	base::func(m,n);
}

void seiya(int a,int b)
{
	cout<<a<<endl<<b<<endl;
	cout<<"this is seiya callback function"<<endl;
}

void zilong(int a,int b)
{
	cout<<a<<endl<<b<<endl;
	cout<<"this is zilong callback function"<<endl;
}

void main(void)
{
	base ba;
	ba.registercallback(seiya,2,3);
	ba.callcallback();

	ba.registercallback(zilong,5,6);   
	ba.callcallback();
}